<?php

class allocations extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
        $this->load->model('allocationsmodel');
    }

    public function addallocation()
    {
        $this->allocationsmodel->addallocation();
        $this->load->view('allocations/addsuccess');

    }

    public function add()
    {
        $this->load->view('allocations/add');
    }

    public function getallocation()
    {
        $data['datareceived'] = $this->allocationsmodel->getData();
        $this->load->view('allocations/edit', $data);
    }

    public function updateallocation()
    {
        $this->allocationsmodel->updateData();
        $this->load->view('allocations/updatesuccess');

    }

    public function view()
    {
        $data['allocations'] = $this->allocationsmodel->view();
        $this->load->view('allocations/allocations', $data);
    }

    public function viewind()
    {
        $data['allocations'] = $this->allocationsmodel->viewind();
        $this->load->view('allocations/view', $data);
    }
}

?>